package com.codeoss.framework.view.renderer;

import org.springframework.stereotype.Service;

import com.codeoss.framework.context.YunContext;
import com.codeoss.framework.util.StringUtils;
import com.codeoss.framework.view.component.Component;

@Service("ureport2Renderer")
public class UReport2Renderer extends CommonComponentRenderer {
	protected PropSerializeMap startRenderProp(YunContext yunContext,
			Component component, ViewPropMap viewPropMap) {
		PropSerializeMap propSerializeMap=super.startRenderProp(yunContext, component, viewPropMap);
		String content=(String)yunContext.getAttribute(component.getId()+"_content");
		if(!StringUtils.isEmpty(content)) {
			if(propSerializeMap==null) {
				propSerializeMap=createPropSerializeMap(yunContext, component, viewPropMap);
			}
			propSerializeMap.put("content", content);
			String style=(String)yunContext.getAttribute(component.getId()+"_style");
			propSerializeMap.put("style", style);
		}
		return propSerializeMap;
	}
}
